/** @file
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef PACKET_DIALOG_H
#define PACKET_DIALOG_H

#include <QDialog>

#include <stdint.h>
#include <glib.h>

#include <tvbuff.h>
#include <packet.h>
#include <proto.h>

#include "lua_dissect.h"
//#include "wiretap/wtap.h"
//#include "wsutil/buffer.h"

#include <field_information.h>

class ByteViewTab;
class ProtoTree;

namespace Ui {
class PacketDialog;
}

class PacketDialog : public QDialog
{
    Q_OBJECT

public:
    explicit PacketDialog(QWidget *parent, const QByteArray &fdata);
    ~PacketDialog();

protected:
    void captureFileClosing();

private slots:
    void viewVisibilityStateChanged(int);
    void layoutChanged(int);

    void setHintText(FieldInformation *);
    void setHintTextSelected(FieldInformation*);

private:
    Ui::PacketDialog *ui;

    QString col_info_;
    ProtoTree *proto_tree_;
    ByteViewTab *byte_view_tab_;

    lua_dissector_t *ldt_;
};

#endif // PACKET_DIALOG_H
